/*
 * debug_funs.h
 *
 *  Created on: Sep 29, 2012
 *      Author: Zermingore
 *
 *	pure C style (due to target debug functions [fread...])
 */

/* #include "common/stl.h"
 * not authorized because it's a C-file (and stl.h includes STL containers)
 */
#include <stdlib.h>
#include <unistd.h>

#include "tools/debug_funs.hh"

#include "common/stl.h"

/** tools designed to debug */


/** safe_fread is only a fread return value checker */
void safe_fread(void *ptr, size_t size, size_t nmemb, FILE *stream)
{
	if (!fread(ptr, size, nmemb, stream))
	{
		std::cerr << "fread error" << std::endl;
		exit(-1);
	}
}
